package com.dy.lock.screen.dao.impl;

import java.util.List;

import org.springframework.stereotype.Repository;

import com.dy.lock.screen.dao.CustomerTagDao;
import com.dy.lock.screen.pojo.CustomerTagRelation;

@Repository("customerTagDao")
public class CustomerTagDaoImpl extends
		BaseDaoImpl<CustomerTagRelation, String> implements CustomerTagDao {

	@Override
	public String getQueryNamespace() {
		return "mybatis.xml.CustomerTagRelationMapper";
	}

	@Override
	public String queryMaxId() {
		return this.getSqlSession().selectOne(
				this.getQueryNamespace() + ".queryMaxId");
	}

	@Override
	public List<CustomerTagRelation> queryByCustomerId(String customerId) {
		return this.getSqlSession().selectList(
				this.getQueryNamespace() + ".queryByCustomerId", customerId);
	}

	@Override
	public List<String> queryTagByCustomerId(String customerId) {
		// TODO Auto-generated method stub
		return this.getSqlSession().selectList(
				this.getQueryNamespace() + ".queryTagByCustomerId", customerId);
	}

}
